const _ = require('lodash')
const path = require('path')
const dao = require(path.join(process.cwd(),"dao/Dao"))
const attributeDao = require(path.join(process.cwd(), 'dao/AttributeDao'))

// 获取属性列表
module.exports.getAttributes = function(cat_id, sel, cb) {
    attributeDao.list(cat_id, sel, (err, attrs) => {
        if (err) return cb('获取分类属性列表失败')
        cb(null, attrs)
    })
}